/**
 * Copyright (c) 2017,安徽皖通科技股份有限公司 All rights reserved.
 * @data:2017年10月9日
 * @author:MaShibo
 */
package com.wttech.dzzf.process.model.issuer;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import com.wtkj.dao.annotation.DatabaseTable;
import com.wtkj.dao.annotation.PrimaryKey;
import com.wtkj.vo.AbstractValueObject;

import cn.com.taiji.sdk.model.comm.protocol.annotation.EnumValidate;
import cn.com.taiji.sdk.model.comm.protocol.annotation.TimeValidate;
import cn.com.taiji.sdk.model.comm.protocol.annotation.TimeValidate.TimeType;
import etc.com.fasterxml.jackson.annotation.JsonInclude;
import etc.com.fasterxml.jackson.annotation.JsonInclude.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 发行方信息
 * 
 * @date 2017年10月9日
 * @author MaShibo
 */
@DatabaseTable(tableName = "BS_ISSUER")
@Data
@EqualsAndHashCode(callSuper = false)
@JsonInclude(Include.NON_NULL)
public class Issuer extends AbstractValueObject {
    
    
    private static final long serialVersionUID = 509046731448883738L;
    
    @PrimaryKey
    @NotNull(message = "id必填")
    @Pattern(regexp = "^\\d{6}$", message = "id为6位数字字符")
    private String id;
    
    @Size(max = 50, message = "name最大长度为50字符")
    @NotNull(message = "name必填")
    private String name;
    
    @Size(max = 50, message = "contact最大长度为50字符")
    @NotNull(message = "contact必填")
    private String contact;
    
    @Size(max = 20, message = "tel最大长度为20字符")
    @NotNull(message = "tel必填")
    private String tel;
    
    @Size(max = 100, message = "address最大长度为100字符")
    @NotNull(message = "address必填")
    private String address;
    
    @Size(max = 10, message = "startTime最大长度为10字符")
    @TimeValidate(type = TimeType.DATE, message = "startTime格式不正确")
    @NotNull(message = "生效日期必填")
    private String startTime;
    
    @Size(max = 10, message = "endTime最大长度为10字符")
    @TimeValidate(type = TimeType.DATE, message = "endTime格式不正确")
    @NotNull(message = "失效日期必填")
    private String endTime = "2999-12-31";
    
    @EnumValidate(message = "operation不正确", regexp = "(1|2|3)")
    @NotNull(message = "operation操作必填")
    private Integer operation = 1;
    
    @Size(max = 100, message = "bank 最大长度为100字符")
    private String bank;
    
    @Size(max = 100, message = "bankAddr 最大长度为100字符")
    private String bankAddr;
    
    @Size(max = 20, message = "bankAccount 最大长度为20字符")
    private String bankAccount;
    
    @Size(max = 20, message = "taxpayerCode 最大长度为20字符")
    private String taxpayerCode;
    
    @Size(max = 20, message = "creditCode 最大长度为20字符")
    private String creditCode;
    
}
